<template>
	<view class="container">
		<view class="o-p">
		<view class="u-b c-r-l c-bg-f o-p o-ptn">
			<view class="o-ptb l-fjb">
				<view class="c-t75 c-tb ">电梯信息</view>
				<view class="c-t5 c-color-g2">{{details.updateTime}}</view>
			</view>
			<view class="o-plr c-line-13">
				<view class="">
					<text class="c-ws">电梯注册代码：</text>
					{{details.elevCode}}
				</view>
				<view class="">
					<text class="c-ws">安装地址：</text>
					{{details.location}}
				</view>
				<view class="">
					<text class="c-ws">详细位置：</text>
					{{details.locationDetail}}
				</view>
			</view>
			<view class="o-plr">
				<view class="c-t75 c-tb o-ptb">投诉建议</view>
				<view class="c-line-13">
					<text class="c-ws">姓名：</text>
					{{details.complainName}}
				</view>
				<view class="c-line-13">
					<text class="c-ws">电话：</text>
					{{details.complainPhone}}
				</view>
				<com-textarea v-if="details.complainContent" :placeholder="details.complainContent" :disabled="true" :show="false" :bg="{'background-color':'#f5f5f5'}" :height="{height: '150rpx'}"></com-textarea>
			</view>
			<block v-if="imgs.length>0">
			<view class="c-t75 c-tb o-ptb">图片</view>
			<view class="l-fc l-fw" style="margin: 0 -6px;">
				<view v-for="(item, index) in imgs":key="index" class="" style="margin: 6px;">
					<image @click="$Function.PreviewImage(imgs,index)" style="width: 100px;height: 100px;" :src="item" mode="aspectFill"></image>
				</view>
			</view>
			</block>
		</view>
		
		<view v-if="details.complainReply.replyContent" class="u-b c-r-l c-bg-f o-p o-mt">
			<view class="c-t7 c-tb">回复内容</view>
			<view class="o-p">{{details.complainReply.replyContent}}</view>
			<view class="c-tr c-t6 c-color-g2">{{details.complainReply.createTime}}</view>
		</view>
		
		
		</view>
	</view>
</template>

<script>
	import comTextarea from "@/components/comtextarea.vue"
	export default {
		name: 'proposal',
		data() {
			return {
				id: null,
				details: {},
				imgs: []
			}
		},
		components:{comTextarea},
		onLoad(opt) {
			this.id = opt.id;
			this.getDetails()
		},
		methods:{
			getDetails() {
				this.$store.dispatch('get_complainDetail', {id:this.id})
				.then(res => {
					if(res.data.code == "200") {
						console.log('res ==>', res.data.data)
						this.details = res.data.data
						this.imgs = res.data.data.complainImgUrl.split(',')
						
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	
</style>
